﻿using Domain.Repository;
using Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Domain.Entity;

namespace Application.AppService.SGDAppService
{
    public class SGDAppService : ISGDAppService
    {
        private readonly ISGDRepository sGDRepository;

        public SGDAppService(ISGDRepository sGDRepository)
        {
            this.sGDRepository = sGDRepository;
        }
        public Task<bool> AddSgdAsync(SGD sgd)
        {
          return sGDRepository.AddSgdAsync(sgd);
        }
        //根据SalaryGrantId查询SGD表
        public Task<List<SGD>> GetAllSgdSalaryGrantIdAsync(string SalaryGrantId)
        {
            return sGDRepository.GetAllSgdSalaryGrantIdAsync(SalaryGrantId);
        }

       public  Task<bool> RemoveSGDAsync(int GrdId, double BounsSum, double SaleSum, double DeductSum, double SalaryPaidSum)
        {
            return sGDRepository.RemoveSGDAsync(GrdId, BounsSum,SaleSum,DeductSum,SalaryPaidSum);
        }
    }
}
